import { createStore,applyMiddleware } from  'redux'
import thunk from 'redux-thunk'
import { composeWithDevTools } from 'redux-devtools-extension'
import rootReducer from '@/store/reducers'



const store = createStore(rootReducer,composeWithDevTools(applyMiddleware(thunk)))
export default store





// import { getToken } from '@/utils/auth'
// createStore的第二个参数的位置传入整个state的初始状态，可以再前端缓存中，同步到store
// const initialState = {
//     login:getToken()
// }
// const store = createStore(rootReducer,initialState,composeWithDevTools(applyMiddleware(thunk)))
// export default store


